package com.wac.data.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wac.data.entity.State;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author beta
 * @since 2023-03-16
 */
public interface StateMapper extends BaseMapper<State> {

	//分页查询某用户的关注信息 类型 用户、番剧
	@Select("select follow_id from state where user_id = #{userId} and type = #{type}")
	Page<State> selectFollowByUserId(Page page, String userId, String type);

	//分页查询某用户的粉丝
	@Select("select user_id from state where follow_id = #{userId} and type = 'user'")
	Page<State> selectFansByUserId(Page page, String userId);


}
